#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <rpm/rpmlib.h>

#include "rapt-compat.h"

bool startswith(const char *str, const char *prefix);

bool endswith(const char *str, const char *suffix);

#if defined(__APPLE__) || defined(__FREEBSD__)
int selectRPMs(struct dirent *ent);
#else
int selectRPMs(const struct dirent *ent);
#endif

void simpleProgress(unsigned int current, unsigned int total);

Header readHeader(const char *path);

bool copyTag(Header h1, Header h2, raptTag tag);

void copyTags(Header h1, Header h2, int tagc, raptTag tagv[]);

void addAptTags(Header h, const char *d, const char *b, unsigned int st_size);

